// echarts.config.ts
import * as echarts from 'echarts/core';
import { BarChart, PieChart } from 'echarts/charts';
import { TitleComponent, TooltipComponent } from 'echarts/components';
import { LabelLayout } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
import type {
  BarSeriesOption,
  PieSeriesOption,
  TitleComponentOption,
  TooltipComponentOption,
} from 'echarts';
import type { ComposeOption } from 'echarts/core';

export type ECOption = ComposeOption<
  | BarSeriesOption
  | PieSeriesOption
  | TitleComponentOption
  | TooltipComponentOption
>;

echarts.use([
  BarChart,
  PieChart,
  TitleComponent,
  TooltipComponent,
  CanvasRenderer,
  LabelLayout,
]);

export default echarts;